home *** CD-ROM | disk | FTP | other *** search
- #pragma once
-
- class RectUtil{
- public:
- static void ScaleRectToFit(Rect* objRect,Rect* enclRect);
- static void ScaleRectToContain(Rect* enclRect,Rect* objRect);
- static void CenterRectToFit(Rect* theRect,Rect* enclRect);
- static void CenterRectOnPoint(Rect* theRect,Point center);
-
- static void LocalToGlobal(Rect* theRect);
- static void GlobalToLocal(Rect* theRect);
- static short RectWidth(const Rect& r)
- { return r.right - r.left;}
- static short RectHeight(const Rect& r)
- { return r.bottom - r.top;}
- };
-